<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../../../assets/docs.css" rel="stylesheet" type="text/css" media="screen" />
<title>MooTools 1.3 Documentation - Types/Object</title>
</head>

<body>
  <div class="doc">
    <div class="methods">
      <h4 class="menu-item"><a href="#Object">Object</a></h4>
      <div class="menu-item"><a href="#Object:Object-each">Object.each</a></div>
      <div class="menu-item"><a href="#Object:Object-merge">Object.merge</a></div>
      <div class="menu-item"><a href="#Object:Object-clone">Object.clone</a></div>
      <div class="menu-item"><a href="#Object:Object-append">Object.append</a></div>
      <div class="menu-item"><a href="#Object:Object-subset">Object.subset</a></div>
      <div class="menu-item"><a href="#Object:Object-map">Object.map</a></div>
      <div class="menu-item"><a href="#Object:Object-filter">Object.filter</a></div>
      <div class="menu-item"><a href="#Object:Object-every">Object.every</a></div>
      <div class="menu-item"><a href="#Object:Object-some">Object.some</a></div>
      <div class="menu-item"><a href="#Object:Object-keys">Object.keys</a></div>
      <div class="menu-item"><a href="#Object:Object-values">Object.values</a></div>
      <div class="menu-item"><a href="#Object:Object-getLength">Object.getLength</a></div>
      <div class="menu-item"><a href="#Object:Object-keyOf">Object.keyOf</a></div>
      <div class="menu-item"><a href="#Object:Object-contains">Object.contains</a></div>
      <div class="menu-item"><a href="#Object:Object-toQueryString">Object.toQueryString</a></div>
      <h4 class="menu-item"><a href="#Deprecated-Functions">Deprecated.Functions</a></h4>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash">Hash</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:has">has</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:keyOf">keyOf</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:hasValue">hasValue</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:extend">extend</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:combine">combine</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:erase">erase</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:get">get</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:set">set</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:empty">empty</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:include">include</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:map">map</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:filter">filter</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:every">every</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:some">some</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:getKeys">getKeys</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:getValues">getValues</a></div>
      <div class="menu-item"><a href="#Deprecated-Functions:Hash:toQueryString">toQueryString</a></div>
    </div>
    <div class="l-border r-border span-15 content">
      <h1 id="Object"><a href="#Object">Type: Object</a></h1>
      <p class="description">A collection of Object functions.</p>
      <h3>See Also:</h3>
      <ul>
        <li><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">MDC Object</a></li>
      </ul>
      <h2 id="Object:Object-each"><a href="#Object:Object-each">Function: Object.each</a></h2>
      <p class="description">Used to iterate through an object.</p>
      <h3>Syntax:</h3>
      <pre class="javascript">Object.<span class="me1">each</span><span class="br0">(</span>obj, fn<span class="br0">[</span>, bind<span class="br0">]</span><span class="br0">)</span>;

</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>obj      - (<em>object</em>) The object to iterate through.</li>
        <li>fn       - (<em>function</em>) The function to test for each element.</li>
        <li>bind     - (<em>object</em>, optional) The object to use as 'this' within the function. For more information see <a href="../../../docs/core/Types/Function.html#Function:bind">Function:bind</a>.</li>
      </ol>
      <h4>Argument: fn</h4>
      <h5>Syntax:</h5>
      <pre class="javascript">fn<span class="br0">(</span><span class="kw1">item</span>, index, object<span class="br0">)</span>
</pre>
      <h5>Arguments:</h5>
      <ol>
        <li>item   - (<em>mixed</em>) The current item in the array.</li>
        <li>index  - (<em>number</em>) The current item's key.</li>
        <li>object - (<em>mixed</em>) The actual array/object.</li>
      </ol>
      <h3>Example:</h3>
      <pre class="javascript"><span class="co1">// alerts 'The first day of the week is Sunday', 'The second day of the week is Monday', etc.:</span>
Object.<span class="me1">each</span><span class="br0">(</span><span class="br0">{</span>first: <span class="st0">'Sunday'</span>, second: <span class="st0">'Monday'</span>, third: <span class="st0">'Tuesday'</span><span class="br0">}</span>, <span class="kw2">function</span><span class="br0">(</span>value, key<span class="br0">)</span><span class="br0">{</span>

    <span class="kw3">alert</span><span class="br0">(</span><span class="st0">'The '</span> + key + <span class="st0">' day of the week is '</span> + value<span class="br0">)</span>;
<span class="br0">}</span><span class="br0">)</span>;
</pre>
      <h3>Notes:</h3>
      <p>This method is an object-specific equivalent of <em>$each</em> from MooTools 1.2.</p>
      <h2 id="Object:Object-merge"><a href="#Object:Object-merge">Function: Object.merge</a></h2>
      <p class="description">Merges any number of objects recursively without referencing them or their sub-objects.</p>
      <h3>Syntax:</h3>
      <pre class="javascript"><span class="kw2">var</span> merged = Object.<span class="me1">merge</span><span class="br0">(</span>obj1, obj2<span class="br0">[</span>, obj3<span class="br0">[</span>, ...<span class="br0">]</span><span class="br0">]</span><span class="br0">)</span>;

</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>(objects) Any number of objects.</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>object</em>) The object that is created as a result of merging all the objects passed in.</li>
      </ul>
      <h3>Examples:</h3>
      <pre class="javascript"><span class="kw2">var</span> obj1 = <span class="br0">{</span>a: <span class="nu0">0</span>, b: <span class="nu0">1</span><span class="br0">}</span>;
<span class="kw2">var</span> obj2 = <span class="br0">{</span>c: <span class="nu0">2</span>, d: <span class="nu0">3</span><span class="br0">}</span>;

<span class="kw2">var</span> obj3 = <span class="br0">{</span>a: <span class="nu0">4</span>, d: <span class="nu0">5</span><span class="br0">}</span>;
<span class="kw2">var</span> merged = Object.<span class="me1">merge</span><span class="br0">(</span>obj1, obj2, obj3<span class="br0">)</span>; <span class="co1">// returns {a: 4, b: 1, c: 2, d: 5}, (obj2, and obj3 are unaltered)</span>

&nbsp;

merged === obj1; <span class="co1">// true, obj1 gets altered and returned as merged object</span>
&nbsp;
<span class="kw2">var</span> nestedObj1 = <span class="br0">{</span>a: <span class="br0">{</span>b: <span class="nu0">1</span>, c: <span class="nu0">1</span><span class="br0">}</span><span class="br0">}</span>;

<span class="kw2">var</span> nestedObj2 = <span class="br0">{</span>a: <span class="br0">{</span>b: <span class="nu0">2</span><span class="br0">}</span><span class="br0">}</span>;
<span class="kw2">var</span> nested = Object.<span class="me1">merge</span><span class="br0">(</span>nestedObj1, nestedObj2<span class="br0">)</span>; <span class="co1">// returns: {a: {b: 2, c: 1}}</span>

</pre>
      <h2 id="Object:Object-clone"><a href="#Object:Object-clone">Function: Object.clone</a></h2>
      <p class="description">Returns a copy of an object.</p>
      <h3>Syntax:</h3>
      <pre class="javascript"><span class="kw2">var</span> clone = Object.<span class="me1">clone</span><span class="br0">(</span>obj<span class="br0">)</span>;

</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>(obj) The object to clone</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>object</em>) A copy of the passed object</li>
      </ul>
      <h3>Example:</h3>
      <pre class="javascript"><span class="kw2">var</span> obj1 = <span class="br0">{</span>a: <span class="nu0">0</span>, b: <span class="nu0">1</span><span class="br0">}</span>;
<span class="kw2">var</span> obj2 = Object.<span class="me1">clone</span><span class="br0">(</span>obj1<span class="br0">)</span>;

&nbsp;
obj1.<span class="me1">a</span> = <span class="nu0">42</span>;
<span class="kw3">alert</span><span class="br0">(</span>obj1.<span class="me1">a</span><span class="br0">)</span>;  <span class="co1">// alerts '42'</span>
<span class="kw3">alert</span><span class="br0">(</span>obj2.<span class="me1">a</span><span class="br0">)</span>;  <span class="co1">// alerts '0'</span>

</pre>
      <h3>Notes:</h3>
      <p>This is an object-specific equivalent of <em>$unlink</em> from MooTools 1.2.</p>
      <h2 id="Object:Object-append"><a href="#Object:Object-append">Function: Object.append</a></h2>
      <p class="description">Copies all the properties from the second object passed in to the first object passed in.</p>
      <h3>Syntax:</h3>
      <pre class="javascript">Object.<span class="me1">append</span><span class="br0">(</span>original, extension<span class="br0">)</span>;
</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>original  - (<em>object</em>) The object to be extended.</li>
        <li>extension - (<em>object</em>) The object whose properties will be copied to original.</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>object</em>) The first object passed in, extended.</li>
      </ul>
      <h3>Examples:</h3>
      <pre class="javascript"><span class="kw2">var</span> firstObj = <span class="br0">{</span>
    <span class="kw3">name</span>: <span class="st0">'John'</span>,
    lastName: <span class="st0">'Doe'</span>
<span class="br0">}</span>;
<span class="kw2">var</span> secondObj = <span class="br0">{</span>

    age: <span class="st0">'20'</span>,
    sex: <span class="st0">'male'</span>,
    lastName: <span class="st0">'Dorian'</span>
<span class="br0">}</span>;
Object.<span class="me1">append</span><span class="br0">(</span>firstObj, secondObj<span class="br0">)</span>;
<span class="co1">//firstObj is now: {name: 'John', lastName: 'Dorian', age: '20', sex: 'male'};</span>

</pre>
      <h3>Notes:</h3>
      <p>This method is an object-specific equivalent of <em>$extend</em> from MooTools 1.2.</p>
      <h2 id="Object:Object-subset"><a href="#Object:Object-subset">Function: Object.subset</a></h2>
      <p class="description">Get a subset of an object.</p>
      <h3>Syntax:</h3>
      <pre class="javascript">Object.<span class="me1">subset</span><span class="br0">(</span>object, keys<span class="br0">)</span>;
</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>object - (<em>object</em>) The object.</li>
        <li>keys - (<em>array</em>) An array with the keys.</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>object</em>) The subset of the Object.</li>
      </ul>
      <h3>Examples:</h3>
      <pre class="javascript"><span class="kw2">var</span> object = <span class="br0">{</span>
    a: <span class="st0">'one'</span>,
    b: <span class="st0">'two'</span>,
    c: <span class="st0">'three'</span>
<span class="br0">}</span>;
Object.<span class="me1">subset</span><span class="br0">(</span>object, <span class="br0">[</span><span class="st0">'a'</span>, <span class="st0">'c'</span><span class="br0">]</span><span class="br0">)</span>; <span class="co1">// returns {a: 'one', c: 'three'}</span>

</pre>
      <h2 id="Object:Object-map"><a href="#Object:Object-map">Function: Object.map</a></h2>
      <p class="description">Creates a new map with the results of calling a provided function on every value in the map.</p>
      <h3>Syntax:</h3>
      <pre class="javascript"><span class="kw2">var</span> mappedObject = Object.<span class="me1">map</span><span class="br0">(</span>object, fn<span class="br0">[</span>, bind<span class="br0">]</span><span class="br0">)</span>;

</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>object - (<em>object</em>) The object.</li>
        <li>fn   - (<em>function</em>) The function to produce an element of the Object from an element of the current one.</li>
        <li>bind - (<em>object</em>, optional) The object to use as 'this' in the function. For more information see <a href="../../../docs/core/Types/Function.html#Function:bind">Function:bind</a>.</li>
      </ol>
      <h4>Argument: fn</h4>
      <h5>Syntax:</h5>
      <pre class="javascript">fn<span class="br0">(</span>value, key, object<span class="br0">)</span>
</pre>
      <h5>Arguments:</h5>
      <ol>
        <li>value - (<em>mixed</em>) The current value in the object.</li>
        <li>key   - (<em>string</em>) The current value's key in the object.</li>
        <li>object - (<em>object</em>) The actual object.</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>object</em>) The new mapped object.</li>
      </ul>
      <h3>Examples:</h3>
      <pre class="javascript"><span class="kw2">var</span> myObject = <span class="br0">{</span>a: <span class="nu0">1</span>, b: <span class="nu0">2</span>, c: <span class="nu0">3</span><span class="br0">}</span>;

<span class="kw2">var</span> timesTwo = Object.<span class="me1">map</span><span class="br0">(</span>timesTwo, <span class="kw2">function</span><span class="br0">(</span>value, key<span class="br0">)</span><span class="br0">{</span>
    <span class="kw1">return</span> value * <span class="nu0">2</span>;

<span class="br0">}</span><span class="br0">)</span>; <span class="co1">// timesTwo now holds an object containing: {a: 2, b: 4, c: 6};</span>
</pre>
      <h2 id="Object:Object-filter"><a href="#Object:Object-filter">Function: Object.filter</a></h2>
      <p class="description">Creates a new object with all of the elements of the object for which the provided filtering function returns true.</p>
      <h3>Syntax:</h3>
      <pre class="javascript"><span class="kw2">var</span> filteredObject = Object.<span class="me1">filter</span><span class="br0">(</span>object, fn<span class="br0">[</span>, bind<span class="br0">]</span><span class="br0">)</span>;

</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>object - (<em>object</em>) The object.</li>
        <li>fn   - (<em>function</em>) The function to test each element of the Object. This function is passed the value and its key in the Object.</li>
        <li>bind - (<em>object</em>, optional) The object to use as 'this' in the function. For more information see <a href="../../../docs/core/Types/Function.html#Function:bind">Function:bind</a>.</li>
      </ol>
      <h4>Argument: fn</h4>
      <h5>Syntax:</h5>
      <pre class="javascript">fn<span class="br0">(</span>value, key, object<span class="br0">)</span>
</pre>
      <h5>Arguments:</h5>
      <ol>
        <li>value - (<em>mixed</em>) The current value in the object.</li>
        <li>key   - (<em>string</em>) The current value's key in the object.</li>
        <li>object - (<em>object</em>) The actual object.</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>object</em>) The new filtered object.</li>
      </ul>
      <h3>Examples:</h3>
      <pre class="javascript"><span class="kw2">var</span> myObject = <span class="br0">{</span>a: <span class="nu0">10</span>, b: <span class="nu0">20</span>, c: <span class="nu0">30</span><span class="br0">}</span>;

<span class="kw2">var</span> biggerThanTwenty = Object.<span class="me1">filter</span><span class="br0">(</span>myObject, <span class="kw2">function</span><span class="br0">(</span>value, key<span class="br0">)</span><span class="br0">{</span>
    <span class="kw1">return</span> value &gt; <span class="nu0">20</span>;

<span class="br0">}</span><span class="br0">)</span>; <span class="co1">// biggerThanTwenty now holds an object containing: {c: 30}</span>
</pre>
      <h2 id="Object:Object-every"><a href="#Object:Object-every">Function: Object.every</a></h2>
      <p class="description">Returns true if every value in the object satisfies the provided testing function.</p>
      <h3>Syntax:</h3>
      <pre class="javascript"><span class="kw2">var</span> allPassed = Object.<span class="me1">every</span><span class="br0">(</span>object, fn<span class="br0">[</span>, bind<span class="br0">]</span><span class="br0">)</span>;

</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>object - (<em>object</em>) The object.</li>
        <li>fn   - (<em>function</em>) The function to test each element of the Object. This function is passed the value and its key in the Object.</li>
        <li>bind - (<em>object</em>, optional) The object to use as 'this' in the function. For more information see <a href="../../../docs/core/Types/Function.html#Function:bind">Function:bind</a>.</li>
      </ol>
      <h4>Argument: fn</h4>
      <h5>Syntax:</h5>
      <pre class="javascript">fn<span class="br0">(</span>value, key, object<span class="br0">)</span>
</pre>
      <h5>Arguments:</h5>
      <ol>
        <li>value - (<em>mixed</em>) The current value in the object.</li>
        <li>key   - (<em>string</em>) The current value's key in the object.</li>
        <li>object  - (<em>object</em>) The actual object.</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>boolean</em>) If every value in the Object satisfies the provided testing function, returns true. Otherwise, returns false.</li>
      </ul>
      <h3>Examples:</h3>
      <pre class="javascript"><span class="kw2">var</span> myObject = <span class="br0">{</span>a: <span class="nu0">10</span>, b: <span class="nu0">4</span>, c: <span class="nu0">25</span>, d: <span class="nu0">100</span><span class="br0">}</span>;

<span class="kw2">var</span> areAllBigEnough = Object.<span class="me1">every</span><span class="br0">(</span>myObject, <span class="kw2">function</span><span class="br0">(</span>value, key<span class="br0">)</span><span class="br0">{</span>
    <span class="kw1">return</span> value &gt; <span class="nu0">20</span>;

<span class="br0">}</span><span class="br0">)</span>; <span class="co1">// areAllBigEnough = false</span>
</pre>
      <h2 id="Object:Object-some"><a href="#Object:Object-some">Function: Object.some</a></h2>
      <p class="description">Returns true if at least one value in the object satisfies the provided testing function.</p>
      <h3>Syntax:</h3>
      <pre class="javascript"><span class="kw2">var</span> anyPassed = Object.<span class="me1">some</span><span class="br0">(</span>object, fn<span class="br0">[</span>, bind<span class="br0">]</span><span class="br0">)</span>;

</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>object - (<em>object</em>) The object.</li>
        <li>fn   - (<em>function</em>) The function to test each element of the object. This function is passed the value and its key in the object.</li>
        <li>bind - (<em>object</em>, optional) The object to use as 'this' in the function. For more information see <a href="../../../docs/core/Types/Function.html#Function:bind">Function:bind</a>.</li>
      </ol>
      <h4>Argument: fn</h4>
      <h5>Syntax:</h5>
      <pre class="javascript">fn<span class="br0">(</span>value, key, object<span class="br0">)</span>
</pre>
      <h5>Arguments:</h5>
      <ol>
        <li>value - (<em>mixed</em>) The current value in the object.</li>
        <li>key   - (<em>string</em>) The current value's key in the object.</li>
        <li>object  - (<em>object</em>) The actual object.</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>boolean</em>) If any value in the object satisfies the provided testing function, returns true. Otherwise, returns false.</li>
      </ul>
      <h3>Examples:</h3>
      <pre class="javascript"><span class="kw2">var</span> myObject = <span class="br0">{</span>a: <span class="nu0">10</span>, b: <span class="nu0">4</span>, c: <span class="nu0">25</span>, d: <span class="nu0">100</span><span class="br0">}</span>;

<span class="kw2">var</span> areAnyBigEnough = Object.<span class="me1">some</span><span class="br0">(</span>myObject, <span class="kw2">function</span><span class="br0">(</span>value, key<span class="br0">)</span><span class="br0">{</span>
    <span class="kw1">return</span> value &gt; <span class="nu0">20</span>;

<span class="br0">}</span><span class="br0">)</span>; <span class="co1">//isAnyBigEnough = true</span>
</pre>
      <h2 id="Object:Object-keys"><a href="#Object:Object-keys">Function: Object.keys</a></h2>
      <p class="description">Returns an array containing all the keys, in the same order as the values returned by <a href="#Object:Object-values">Object:values</a>.</p>
      <h3>Syntax:</h3>
      <pre class="javascript"><span class="kw2">var</span> keys = Object.<span class="me1">keys</span><span class="br0">(</span>object<span class="br0">)</span>;
</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>object - (<em>object</em>) The object.</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>array</em>) An array containing all the keys of the object.</li>
      </ul>
      <h2 id="Object:Object-values"><a href="#Object:Object-values">Function: Object.values</a></h2>
      <p class="description">Returns an array containing all the values, in the same order as the keys returned by <a href="#Object:Object-keys">Object:keys</a>.</p>
      <h3>Syntax:</h3>
      <pre class="javascript"><span class="kw2">var</span> values = Object.<span class="me1">values</span><span class="br0">(</span>object<span class="br0">)</span>;
</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>object - (<em>object</em>) The object.</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>array</em>) An array containing all the values of the object.</li>
      </ul>
      <h2 id="Object:Object-getLength"><a href="#Object:Object-getLength">Function: Object.getLength</a></h2>
      <p class="description">Returns the number of keys in the object.</p>
      <h3>Syntax:</h3>
      <pre class="javascript"><span class="kw2">var</span> length = Object.<span class="me1">getLength</span><span class="br0">(</span>object<span class="br0">)</span>;
</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>object - (<em>object</em>) The object.</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>number</em>) The length of the object.</li>
      </ul>
      <h3>Examples:</h3>
      <pre class="javascript"><span class="kw2">var</span> myObject = <span class="br0">{</span>
    <span class="kw3">name</span>: <span class="st0">'John'</span>,
    lastName: <span class="st0">'Doe'</span>
<span class="br0">}</span><span class="br0">)</span>;
Object.<span class="me1">getLength</span><span class="br0">(</span>myObject<span class="br0">)</span>; <span class="co1">// returns 2</span>

</pre>
      <h2 id="Object:Object-keyOf"><a href="#Object:Object-keyOf">Function: Object.keyOf</a></h2>
      <p class="description">Returns the key of the specified value. Synonymous with <a href="../../../docs/core/Types/Array.html#Array:indexOf">Array:indexOf</a>.</p>
      <h3>Syntax:</h3>
      <pre class="javascript"><span class="kw2">var</span> key = Object.<span class="me1">keyOf</span><span class="br0">(</span>object<span class="br0">)</span>;

</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>object - (<em>object</em>) The object.</li>
        <li>item - (<em>mixed</em>) The item to search for in the object.</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>string</em>) If the object has a the specified item in it, returns the key of that item.</li>
        <li>(<em>boolean</em>) Otherwise, returns false.</li>
      </ul>
      <h3>Examples:</h3>
      <pre class="javascript"><span class="kw2">var</span> myObject = <span class="br0">{</span>a: <span class="st0">'one'</span>, b: <span class="st0">'two'</span>, c: <span class="nu0">3</span><span class="br0">}</span>;
Object.<span class="me1">keyOf</span><span class="br0">(</span>myObject,<span class="st0">'two'</span><span class="br0">)</span>; <span class="co1">// returns 'b'</span>

Object.<span class="me1">keyOf</span><span class="br0">(</span>myObject,<span class="nu0">3</span><span class="br0">)</span>; <span class="co1">// returns 'c'</span>
Object.<span class="me1">keyOf</span><span class="br0">(</span>myObject,<span class="st0">'four'</span><span class="br0">)</span>; <span class="co1">// returns false</span>

</pre>
      <h2 id="Object:Object-contains"><a href="#Object:Object-contains">Function: Object.contains</a></h2>
      <p class="description">Tests for the presence of a specified value in the object.</p>
      <h3>Syntax:</h3>
      <pre class="javascript"><span class="kw2">var</span> inObject = Object.<span class="me1">contains</span><span class="br0">(</span>object, value<span class="br0">)</span>;

</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>object - (<em>object</em>) The object.</li>
        <li>value - (<em>mixed</em>) The value to search for in the Object.</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>boolean</em>) If the object has the passed in value in any of the keys, returns true. Otherwise, returns false.</li>
      </ul>
      <h3>Examples:</h3>
      <pre class="javascript"><span class="kw2">var</span> myObject = <span class="br0">{</span>a: <span class="st0">'one'</span>, b: <span class="st0">'two'</span>, c: <span class="st0">'three'</span><span class="br0">}</span>;
Object.<span class="me1">contains</span><span class="br0">(</span>myObject, <span class="st0">'one'</span><span class="br0">)</span>; <span class="co1">// returns true</span>

Object.<span class="me1">contains</span><span class="br0">(</span>myObject, <span class="st0">'four'</span><span class="br0">)</span>; <span class="co1">// returns false</span>
</pre>
      <h2 id="Object:Object-toQueryString"><a href="#Object:Object-toQueryString">Function: Object.toQueryString</a></h2>
      <p class="description">Generates a query string from key/value pairs in an object and URI encodes the values.</p>
      <h3>Syntax:</h3>
      <pre class="javascript"><span class="kw2">var</span> queryString = Object.<span class="me1">toQueryString</span><span class="br0">(</span>object<span class="br0">)</span>;
</pre>
      <h3>Arguments:</h3>
      <ol>
        <li>object - (<em>object</em>) The object.</li>
        <li>source - (<em>object</em>) The object to generate the query string from.</li>
      </ol>
      <h3>Returns:</h3>
      <ul>
        <li>(<em>string</em>) The query string.</li>
      </ul>
      <h3>Examples:</h3>
      <pre class="javascript">Object.<span class="me1">toQueryString</span><span class="br0">(</span><span class="br0">{</span>apple: <span class="st0">'red'</span>, lemon: <span class="st0">'yellow'</span><span class="br0">}</span><span class="br0">)</span>; <span class="co1">// returns 'apple=red&amp;lemon=yellow'</span>

</pre>
      <h1 id="Deprecated-Functions"><a href="#Deprecated-Functions">Deprecated Functions</a></h1>
      <h2 id="Deprecated-Functions:Hash" class="description"><a href="#Deprecated-Functions:Hash">Type: Hash</a></h2>
      <p class="description">Hash has been deprecated. Each Hash method has a similar Object method or a Vanilla JS equivalent.</p>
      <h2 id="Deprecated-Functions:Hash:has"><a href="#Deprecated-Functions:Hash:has">Hash Method: has</a></h2>
      <p class="description">You could simply use <code>myObject.myKey != undefined</code></p>
      <h2 id="Deprecated-Functions:Hash:keyOf"><a href="#Deprecated-Functions:Hash:keyOf">Hash Method: keyOf</a></h2>
      <p class="description">Use <a href="#Object:Object-keyOf">Object.keyOf</a></p>
      <h2 id="Deprecated-Functions:Hash:hasValue"><a href="#Deprecated-Functions:Hash:hasValue">Hash Method: hasValue</a></h2>
      <p class="description">Use <a href="#Object:Object-contains">Object.contains</a></p>
      <h2 id="Deprecated-Functions:Hash:extend"><a href="#Deprecated-Functions:Hash:extend">Hash Method: extend</a></h2>
      <p class="description">Use <a href="#Object:Object-append">Object.append</a></p>
      <h2 id="Deprecated-Functions:Hash:combine"><a href="#Deprecated-Functions:Hash:combine">Hash Method: combine</a></h2>
      <p class="description">Use <a href="#Object:Object-merge">Object.merge</a></p>
      <h2 id="Deprecated-Functions:Hash:erase"><a href="#Deprecated-Functions:Hash:erase">Hash Method: erase</a></h2>
      <p class="description">Use <code>delete myObject.a</code></p>
      <h2 id="Deprecated-Functions:Hash:get"><a href="#Deprecated-Functions:Hash:get">Hash Method: get</a></h2>
      <p class="description">Use <code>myObject.myKey</code></p>
      <h2 id="Deprecated-Functions:Hash:set"><a href="#Deprecated-Functions:Hash:set">Hash Method: set</a></h2>
      <p class="description">Use <code>myObject.myKey = value</code></p>
      <h2 id="Deprecated-Functions:Hash:empty"><a href="#Deprecated-Functions:Hash:empty">Hash Method: empty</a></h2>
      <p class="description">Use <code>myObject = {}</code></p>
      <h2 id="Deprecated-Functions:Hash:include"><a href="#Deprecated-Functions:Hash:include">Hash Method: include</a></h2>
      <p class="description">Use <code>if(myObject.myKey == undefined) myObject.myKey = value</code></p>
      <h2 id="Deprecated-Functions:Hash:map"><a href="#Deprecated-Functions:Hash:map">Hash Method: map</a></h2>
      <p class="description">Use <a href="#Object:Object-map">Object.map</a></p>
      <h2 id="Deprecated-Functions:Hash:filter"><a href="#Deprecated-Functions:Hash:filter">Hash Method: filter</a></h2>
      <p class="description">Use <a href="#Object:Object-filter">Object.filter</a></p>
      <h2 id="Deprecated-Functions:Hash:every"><a href="#Deprecated-Functions:Hash:every">Hash Method: every</a></h2>
      <p class="description">Use <a href="#Object:Object-every">Object.every</a></p>
      <h2 id="Deprecated-Functions:Hash:some"><a href="#Deprecated-Functions:Hash:some">Hash Method: some</a></h2>
      <p class="description">Use <a href="#Object:Object-some">Object.some</a></p>
      <h2 id="Deprecated-Functions:Hash:getKeys"><a href="#Deprecated-Functions:Hash:getKeys">Hash Method: getKeys</a></h2>
      <p class="description">Use <a href="#Object:Object-keys">Object.keys</a></p>
      <h2 id="Deprecated-Functions:Hash:getValues"><a href="#Deprecated-Functions:Hash:getValues">Hash Method: getValues</a></h2>
      <p class="description">Use <a href="#Object:Object-values">Object.values</a></p>
      <h2 id="Deprecated-Functions:Hash:toQueryString"><a href="#Deprecated-Functions:Hash:toQueryString">Hash Method: toQueryString</a></h2>
      <p class="description">Use <a href="#Object:Object-toQueryString">Object.toQueryString</a></p>
    </div>
  </div>
<script type="text/javascript" src="../../../assets/mootools-core-1.3.js"></script>
<script type="text/javascript" src="../../../assets/mootools-more-smoothscroll.js"></script>
<script type="text/javascript" src="../../../assets/doc-assist.js"></script>
</body>
</html>